package com.boil.qz.safekavass.repository;

import com.boil.qz.safekavass.model.SecurityCommitteeUnitEntity;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;

import java.util.List;

/**
 * Created by ChenYong on 2017-11-13.
 * <br>
 * 安委会成员单位实体仓库。
 */
public interface SecurityCommitteeUnitRepository extends JpaRepository<SecurityCommitteeUnitEntity, Long> {
    /**
     * 查询所有安委会成员单位。
     *
     * @return 所有安委会成员单位 <code>List</code>
     */
    @Query(value = "select a from SecurityCommitteeUnitEntity a order by a.code asc")
    List<SecurityCommitteeUnitEntity> findAll();
}